const autoprefixer = require('autoprefixer');
const pxtorem = require('postcss-pxtorem');
const pxtoviewport = require('postcss-px-to-viewport');

module.exports = {
    outputDir: '../app_',
    publicPath: process.env.NODE_ENV === 'production' ? '' : '/',
    lintOnSave: false, //是否开启eslint保存检测 ,它的有效值为 true || false || 'error
    css: {
        loaderOptions: {
            postcss: {
                plugins: [
                    autoprefixer(),
                    pxtoviewport({
                        viewportWidth: 375
                    }),
                    pxtorem({
                        rootValue: 37.5,
                        propList: ['*']
                    })
                ]
            }
        }
    }
};